package com.aismy.admin.service;

import com.aismy.admin.entity.ConsultationMessage;
import com.aismy.admin.entity.ConsultationRecord;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface ConsultationService extends IService<ConsultationRecord> {
    
    /**
     * 创建咨询记录
     * @param consultantId 咨询师ID
     * @param userId 用户ID
     * @return 咨询记录
     */
    ConsultationRecord createConsultation(Long consultantId, Long userId);
    
    /**
     * 结束咨询
     * @param consultationId 咨询记录ID
     */
    void endConsultation(Long consultationId);
    

    void sendMessage(ConsultationMessage message);

    
    /**
     * 获取用户的咨询记录
     * @param userId 用户ID
     * @param page 页码
     * @param size 每页大小
     * @return 咨询记录分页
     */
    Page<ConsultationRecord> getUserConsultations(Long userId, Integer page, Integer size);
    
    /**
     * 获取咨询师的咨询记录
     * @param consultantId 咨询师ID
     * @param page 页码
     * @param size 每页大小
     * @return 咨询记录分页
     */
    Page<ConsultationRecord> getConsultantConsultations(Long consultantId, Integer page, Integer size);

    void markAsRead(List<Long> messageIds);

    Page<ConsultationMessage> getHistoryMessages(Long consultationId, Integer page, Integer size);
}